<template>
	<div class="reg-container">
		<!-- 头部信息 -->
		<div class="header">
			<div class="header-inner container">
				<div class="logo">
					<img :src="logoImg" border="0">
				</div>
			</div>
			<!-- 链接 -->
			<div class="header-link">
				<div class="header-link-login">
					<span class="ext">
						<a @click="toLogin">登录已有帐号</a>
					</span>
				</div>
			</div>
		</div>
		
		<!-- 注册组件 -->
		<regist ref="registRef" v-if="showRegist"/>
		
	</div>
</template>

<script>
	// 引入组件
	import regist from './components/regist';
	
	import { mapGetters } from 'vuex'
	export default {
		/* 注册 */
		name: 'reg-header',
		data(){
			return {
				logoImg: require('@/assets/register-title.jpg'),
				showRegist: true,
			}
		},
		components: {
			regist,
		},
		methods: {
			// 调整登录页面
			toLogin(){
				this.$router.push({
		          	path: '/login'
		        });
			},
			
			// 注册页面
			toRegist(){
				this.showRegist = true
			},
		}
	}
</script>

<style lang="scss" scoped>
  @import "~@/styles/register.css";
</style>